import React from 'react'
import Home from './pages/home'
import CityList from './pages/citylist'
import Map from './pages/map'
import Search from './pages/search'
import { BrowserRouter as Router, Route, Redirect } from 'react-router-dom'

export default class App extends React.Component {
  render() {
    return (
      <Router>
        <div className="App">
          <Route exact path="/" render={()=> <Redirect to="/home"/>}  ></Route>
          <Route path="/home" component={Home}></Route>
          <Route path="/citylist" component={CityList}></Route>
          <Route path="/map" component={Map}></Route>
          <Route path="/search" component={Search}></Route>
        </div>
      </Router>
    )
  }
}
